package com.byx.chatclient.event;

/**
 * MessageEvent
 * 定义一个携带消息的事件
 * @author Superb
 * @date 2021/4/4 11:03
 */
public class MessageEvent {

    private EventType eventType;
    private Object data;

    public MessageEvent() {
    }

    public MessageEvent(EventType eventType) {
        this.eventType = eventType;
    }

    public EventType getEventType() {
        return eventType;
    }

    public void setEventType(EventType eventType) {
        this.eventType = eventType;
    }

    public Object getData() {
        return data;
    }

    public void setData(Object data) {
        this.data = data;
    }

    public static MessageEvent getInstance(){
        return new MessageEvent();
    }

    public static MessageEvent getInstance(EventType eventType){
        return new MessageEvent(eventType);
    }
}
